package com.poizon.api;

import com.poizon.service.intf.MomentTypeService;
import com.poizon.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName MomentTypeController
 * @Author NoCheng
 * @Date 2022/1/6 18:16
 * @Description:TODO 动态类型
 */
@RestController
@CrossOrigin
@RequestMapping("/api/momentType")
@Api(tags = "动态类型接口")
public class MomentTypeController {
    private final MomentTypeService service;

    public MomentTypeController(MomentTypeService service) {
        this.service = service;
    }

    @GetMapping()
    @ApiOperation("获取所有动态类型")
    public R getAllType(){
        return service.queryAll();
    }
}
